package interfaces;

import bean.User;
import java.util.List;

/**
 *
 * @author yakimovich
 */
public interface UserDao {

    /**
     * Create in the Users table row with this user.
     * @param user
     */
    public void create(User user);

    /**
     * Update in the Users table row with this user.
     * @param user
     */
    public void update(User user);

    /**
     * Remove in the Users table row with this user.
     * @param user
     */
    public void remove(User user);

    /**
     * Find in the Users table all users.
     * @return List of all users 
     */
    public List<User> findAll();

    /**
     * Find in the Users table user with the specified login.
     * @param login login of a user
     * @return a user with the specified login
     */
    public User findByLogin(String login);

    /**
     * Find in the Users table users with the specified email.
     * @param email email of user
     * @return a user with the specified email
     */
    public User findByEmail(String email);
}
